#include <sgu-0/sgu.h>
#include "frame.h"

using namespace SGU;

SGUlib * g_sgu;

Frame g_frame __attribute__ ((init_priority (60000)));

int main(int, char ** argv)
{
	g_sgu = new SGUlib(argv[0]);
	try
	{
		mkdir("tmp",0755);
		printf("# sgu by %s\n",g_sgu->queryOwn());
		puts("# begin test");
		g_frame.check();	
		g_frame.users();
		g_frame.bench();
		if(g_frame.isFail())
			puts("# test FAILED");
		else
			puts("# test OK");
	}
	catch(Exception & xe)
	{
		printf("? EXCEPTION: %s\n",xe.text().data());
	}
	delete g_sgu;
	return 0;
}
